<script language='JavaScript'>
var errstr=null;
var bstartnextplay = false;
var fullscreen=false;
var $$ = function() { return document.getElementById(arguments[0]); } 
var qvodurl = window.parent.geturl();
var url= "";
if (window.parent.geturl().indexOf("qvod:") !=-1){
	url = window.parent.geturl().split("|");
	qvodurl = url[0]+"|"+url[1]+"|["+document.domain+"]"+url[2]+"|";
}
document.write("<span id='playad' style='DISPLAY: none'><iframe src='http://union.maccms.com/gg/loading1.html' border='0' marginWidth='0' frameSpacing='0' marginHeight='0' frameBorder='0' noResize scrolling='no' width='100%' height='100%' vspale='0'></iframe></span>");
if(window.ActiveXObject){
	document.write("<object id='QvodPlayer' height='100%' width='100%' onerror='play_error()'  name='QvodPlayer' classid='clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF'><param name='URL' value='"+ qvodurl +"'><param name='AutoPlay' value='1'><PARAM NAME='QvodAdUrl' VALUE='http://union.maccms.com/gg/loading1.html'><PARAM NAME='NextWebPage' VALUE='"+window.parent.getNextUrl()+"'></object>");
}
else{
	document.write("<embed id='QvodPlayer' URL='"+ qvodurl +"' height='100%' width='100%' type='application/qvod-plugin'></embed>");
}

function showswf(offest)
{
	if((QvodPlayer.PlayState==6||QvodPlayer.Duration==QvodPlayer.Currentpos)&&QvodPlayer.Duration!=0&&QvodPlayer.Currentpos!=0){
	}
	if($$('QvodPlayer').PlayState==3 ){
		$$('playad').style.display='none';
		$$('QvodPlayer').style.height = '100%';
	}
	else if ($$('QvodPlayer').Full==false){
		$$('QvodPlayer').style.height = 62;
		$$('playad').style.height=document.body.clientHeight-62;
		$$('playad').style.width=document.body.clientWidth;
		$$('playad').style.display='inline';
	}
	setfull();
	window.setTimeout('StartNextDownFile()',5000);
}
function setfull(){
	if(window.parent.getautoFull()==1 && QvodPlayer.CurrentPos > 0 && !fullscreen){
		QvodPlayer.Full=true;
		fullscreen=true;
	}
}
function StartNextDownFile()
{
	if(QvodPlayer.get_CurTaskProcess() > 990 && !bstartnextplay){
		var url1 = window.parent.getNextUrl(true);
		var rv = QvodPlayer.StartNextDown(url1);
		bstartnextplay = true;
	}
}
function play_error(){
	$$('playad').innerHTML="<iframe border='0' src='http://union.maccms.com/gg/qvod.html' marginWidth='0' frameSpacing='0' marginHeight='0' frameBorder='0' noResize scrolling='no' width='100%' height='100%' vspale='0' ></iframe>";
	$$('playad').style.display='inline';
}
if (QvodPlayer.URL!= undefined){
	setInterval('showswf()','500');
}
else{
	play_error();
}
</script>